@import './variables.scss';

/* menu */
.el-menu {
  // transition: width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  border-width: 0;
  --el-menu-base-level-padding: 16px;
  --el-menu-level-padding: 24px;
  display: flex;
  flex-direction: column;
  .el-menu-item::after {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    border-right: 4px solid $themeColor;
    transform: scaleY(0.0001);
    opacity: 0;
    transition: transform 0.15s cubic-bezier(0.215, 0.61, 0.355, 1),
      opacity 0.15s cubic-bezier(0.215, 0.61, 0.355, 1);
    content: '';
  }
  .is-active.el-menu-item {
    position: relative;
    color: #0a1f33;
    background: #edf2f7 !important;
    // font-weight: bold;
    &::after {
      transform: scaleY(1);
      opacity: 1;
      transition: transform 0.15s cubic-bezier(0.645, 0.045, 0.355, 1),
        opacity 0.15s cubic-bezier(0.645, 0.045, 0.355, 1);
    }
  }
  .el-sub-menu.is-active.is-opened {
    .el-sub-menu__title {
      color: #435970;
    }
  }
  .el-sub-menu__title:not(.is-active):hover,
  .el-menu-item:not(.is-active):hover {
    color: #435970;
    background: #edf2f7;
  }
  .menu-icon {
    width: auto;
    margin-right: 8px;
  }
}

.el-menu-item {
  height: 40px !important;
  margin: 8px 0;
  display: inline-flex;
  width: 100%;
}
.el-menu.el-menu--inline {
  background: #F8FBFC;
  .el-menu-item {
    margin: 4px 0;
  }
}
.el-sub-menu {
  display: flex;
  flex-direction: column;
  .el-sub-menu__icon-arrow {
    right: 12px;
    color: #96A7B3;
  }
}
.el-sub-menu__title {
  margin: 8px 0;
}
.el-menu-item:hover {
  color: #435970;
  background: #EDF2F7;
}

.el-sub-menu.is-active .el-sub-menu__title {
  // color: $themeColor;
}

.el-sub-menu {
  .el-icon.el-sub-menu__icon-arrow {
    transition: transform 0.3s;
    transform: rotate(180deg) !important;
  }
  &.is-opened {
    .el-icon.el-sub-menu__icon-arrow {
      transform: rotate(0deg) !important;
    }
  }
}

.el-menu--popup {
  padding: 5px;
  .el-menu-item {
    height: 40px !important;
    border-radius: 3px;
  }
}
